{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_cjdianc/template/public/ygcss.css">
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>    
    <li><a href="{php echo $this->createWebUrl2('dlcoupons')}">优惠券管理</a></li>
    <li class="active"><a href="{php echo $this->createWebUrl2('dladdcoupons')}">添加/编辑优惠券</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <!--<input type="hidden" name="parentid" value="{$parent['id']}" />-->
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                优惠券管理
            </div>
            <div class="panel-body">
                <form class="form-horizontal" action="" method="POST">



  <div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">优惠券名称</label>

    <div class="col-sm-5">

      <input type="text"  name="name" value="{$list['name']}" class="form-control" id="inputEmail3" placeholder="请填写优惠券">

    </div>

  </div>
  
   <div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">优惠条件金额</label>

    <div class="col-sm-5">
      <div class="input-group">
          <input type="number"  name="conditions" value="{$list['conditions']}" class="form-control" id="inputEmail3" placeholder="请填写优惠条件金额">
          <span class="input-group-addon">元</span>
      </div>
    </div>

  </div>

<div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">优惠金额</label>

    <div class="col-sm-5">
      <div class="input-group">
        <input type="number"  name="preferential" value="{$list['preferential']}" class="form-control" id="inputEmail3" placeholder="请填写优惠金额">
        <span class="input-group-addon">元</span>
      </div>
    </div>

  </div>

<div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">优惠券时间</label>

    <div class="col-sm-5">

    {php echo tpl_form_field_daterange('time',array('start' =>$list['start_time'], 'end' =>$list['end_time']));} 

    </div>

  </div>
  <div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">使用说明</label>

    <div class="col-sm-5">

      <input type="text"  name="instruction" value="{$list['instruction']}" class="form-control" id="inputEmail3" placeholder="请填写使用说明">

    </div>

  </div>
  <div class="form-group">
   <label for="inputEmail3" class="col-sm-2 control-label">设置使用范围</label>
    <div class="col-sm-5">
    <select class="form-control" name="coupons_type"> 
    {if $list['coupons_type']==1}  
      <option value="1" selected="selected">仅限外卖使用</option>  
      <option value="2">仅限店内使用</option>
      <option value="3">两者都可使用</option>
      {elseif $list['coupons_type']==2}
    <option value="1" >仅限外卖使用</option>    
      <option value="2" selected="selected">仅限店内使用</option>
         <option value="3">两者都可使用</option>
        {elseif $list['coupons_type']==3}
      <option value="1" >仅限外卖使用</option>  
       <option value="2">仅限店内使用</option>
      <option value="3" selected="selected">两者都可使用</option>
      {else}
      <option value="1" >仅限外卖使用</option>
      <option value="2">仅限店内使用</option>
      <option value="3">两者都可使用</option>
      {/if}
    </select>
    </div>
     </div>

   <input type="hidden" name="id" value="{$list['id']}"/>

  <input type="hidden" name="token" value="{$_W['token']}"/>

  <div class="form-group" style="margin-top: 20px;">
      <input type="submit" name="submit" value="提交" class="btn col-lg-3" style="color: white;background-color: #44ABF7;"/>

  </div>
</form>

</div>
<script type="text/javascript">
    $(function(){
        // $("#frame-4").addClass("in");
        $("#frame-4").show();
        $("#yframe-4").addClass("wyactive");
    })
</script>
{template 'common/footer'}